package controllers.play;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import util.controllerUtils.ControllerUtil;
import controllers.displayEntites.Msg;

@Controller
@RequestMapping("play")
public class playController {
	@ResponseBody
	@RequestMapping(value = "{key}/index.fruit_slayer", method = RequestMethod.POST)
	public String play(@PathVariable("key") Long key, HttpServletRequest request, Model model) {

		ControllerUtil.setRequestKeyValue(request,new Msg());
		return "{'requestOldkey':'" + request.getAttribute("key") + "'}";
	}
}
